class Solution(object):
    def reverseBits(self, n):
        """
        :type n: int
        :rtype: int
        """
        bits = list(bin(n)[2:])
        bits.reverse()
        while len(bits)<32: bits.append('0')
        return int(''.join(bits),base=2)

print(Solution().reverseBits(0))